package cn.itsource.ymcc.dto;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Date;
import java.util.List;

@Data
public class MessageDto {
    //消息标题
    private String title;
    //消息内容
    private String content;
    //发送时间
    private Date sendTime = new Date();
    private List<SmsDto> smsDtoList;
    private List<EmailDto> emailDtoList;
    private List<StationDto> stationDtoList;

    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class SmsDto{
        private Long userId;
        private String phone;
        private String ip;
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class EmailDto{
        private Long userId;
        private String email;
        private String copyto;
    }
    @Data
    @AllArgsConstructor
    @NoArgsConstructor
    public static class StationDto{
        private Long userId;
        private String type;
        private Boolean isread = false;   //是否已读
        public StationDto(Long userId, String type) {
            this.userId = userId;
            this.type = type;
        }
    }
}
